"use strict";

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
    const { router, controller } = app;
    router.get("/", controller.home.index);

    /*
    |--------------------------------------------------------------------------
    | 页面渲染
    |--------------------------------------------------------------------------
    */

    router.get("/apidoc", controller.home.apidoc);

    /*
    |--------------------------------------------------------------------------
    | Auth
    |--------------------------------------------------------------------------
    */
    const Auth = router.namespace("/x/v1/auth");
    Auth.post("/registerByEmail", controller.users.authController.registerByEmail);


    /*
    |--------------------------------------------------------------------------
    | User
    |--------------------------------------------------------------------------
    */

    const User = router.namespace("/x/v1/user");
    User.get("/fullInfo", controller.users.infoController.fullInfo);


};
